import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/menu/getList',
    method: 'get',
    params,
  })
}

export function getMenuTree(params) {
  return request({
    url: '/menu/getTree',
    method: 'get',
    params,
  })
}

export function getMenuTreeList(params) {
  return request({
    url: '/menu/getTreeList',
    method: 'get',
    params,
  })
}

export function get(params) {
  return request({
    url: '/menu/get',
    method: 'get',
    params,
  })
}

export function _delete(params) {
  return request({
    url: '/menu/delete',
    method: 'post',
    data: params,
  })
}

export function update(params) {
  return request({
    url: '/menu/update',
    method: 'post',
    data: params,
  })
}

export function add(params) {
  return request({
    url: '/menu/add',
    method: 'post',
    data: params,
  })
}
